#! /bin/sh

if [ $# -eq 1 ] ; then
	file="$1"
	name=$( echo "$file" | sed 's/[0-9]%3a//g' )
	if [ "$file" != "$name" ] ; then
		mv "$file" "$name"
	fi
	exit
fi

for file in *
do
	name=$( echo "$file" | sed 's/[0-9]%3a//g' )
	if [ "$file" != "$name" ] ; then
		mv "$file" "$name"
	fi
done

result=$(ls | grep -c "%3a")

if [ $result -ne 0 ] ; then 
    echo "%3a error!"
    exit 1
fi
